From: Leleat Date: Fri, 23 Apr 2021 18:25:07 +0000 (+0200) Subject: windowPreview: Make St.Label use single line mode X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~42 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4e35ca8e269878e110949fb5e9ad6e634364b06f;p=gnome-shell.git windowPreview: Make St.Label use single line mode When a windowPreview is hovered or selected, it will show its window's title as a caption. That title may contain Newline characters which will effect the windowPreview size. Make the caption's St.Label use single line mode to prevent that. Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4162 Part-of: --- diff --git a/js/ui/windowPreview.js b/js/ui/windowPreview.js index 84d80fe3e..e67ec9ec0 100644 --- a/js/ui/windowPreview.js +++ b/js/ui/windowPreview.js @@ -151,6 +151,7 @@ var WindowPreview = GObject.registerClass({ text: this._getCaption(), reactive: true, }); + this._title.clutter_text.single_line_mode = true; this._title.add_constraint(new Clutter.BindConstraint({ source: windowContainer, coordinate: Clutter.BindCoordinate.X,